<?php

namespace App\Models;

use App\Models\Traits\ProjectTrait;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\CellProp
 *
 * @property int $id
 * @property int $project_id 项目ID
 * @property int $cell_id 单元格ID
 * @property string $key 属性键
 * @property string $value 属性值
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereCellId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereProjectId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CellProp whereValue($value)
 * @mixin \Eloquent
 * @property-read \App\Models\Cell $cell
 * @property-read \App\Models\Project $project
 */
class CellProp extends Model
{

    use ProjectTrait;

    protected $fillable = [
        'project_id', 'cell_id', 'key', 'value'
    ];

    public function cell()
    {
        return $this->belongsTo(Cell::class);
    }
}
